import {
  IsInt,
  IsNotEmpty,
  IsNumber,
  IsOptional,
  IsString,
  Length,
} from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';

export class UpdateManagerDto {
  @IsNumber()
  @ApiProperty({ description: '修改用户的id，该数据是必传项' })
  @IsNotEmpty()
  id: number;

  @IsString()
  @IsOptional()
  @ApiProperty({ description: '用户编号' })
  primary_id: string;

  @IsString()
  @IsOptional()
  @ApiProperty({ description: '姓名不可更该' })
  name: string;

  @IsString()
  @IsOptional()
  nickname: string;

  @IsString()
  @IsOptional()
  cover: string;

  @IsString()
  @IsOptional()
  sex: string;

  @IsNumber()
  @IsOptional()
  age: number;

  @IsString()
  @Length(11)
  @IsOptional()
  phone?: string;

  @IsInt()
  @IsOptional()
  status?: string;

  @IsString()
  @IsOptional()
  description: string;
}
